-
-
Notifications
You must be signed in to change notification settings - Fork 8
276 handle subassignemnts with the same object #277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Unit Tests Summary 1 files 14 suites 6s ⏱️ Results for commit 3a6ece3. ♻️ This comment has been updated with latest results. |
Unit Test Performance DifferenceAdditional test case details
Results for commit d43ebd6 ♻️ This comment has been updated with latest results. |
…neering/teal.code into 276_subassignemnets
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enhances the code dependency tracking functionality to properly handle subassignments in R (e.g., x[1] <- value, df$col <- data). The changes fix issues with duplicate handling in dependency extraction and add comprehensive test coverage for various subassignment patterns.
Key changes:
- Improved duplicate handling when moving elements in parentheses to the right-hand side of dependency graphs
- Fixed the
move_functions_after_arrowfunction to preserve duplicates and handle edge cases properly - Added 13 new test cases covering various subassignment scenarios including bracket indexing, nested assignments, and complex expressions
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| R/utils-get_code_dependency.R | Refactored duplicate handling logic in extract_occurrence and move_functions_after_arrow functions to properly track subassignments |
| tests/testthat/test-utils-get_code_dependency.R | Added comprehensive test suite for subassignment tracking with 13 test cases covering various patterns |
| DESCRIPTION | Updated RoxygenNote version from 7.3.2 to 7.3.3 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Code Coverage SummaryDiff against mainResults for commit: 3a6ece3 Minimum allowed coverage is ♻️ This comment has been updated with latest results |
Co-authored-by: Copilot <[email protected]> Signed-off-by: Marcin <[email protected]>
Co-authored-by: Copilot <[email protected]> Signed-off-by: Marcin <[email protected]>
llrs-roche
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great quick fix! The tests are long and cover many cases!
Signed-off-by: Marcin <[email protected]>
Fixes #276
now gives the second line